import {RouteRecordRaw} from "vue-router";
import Layout from '@/Layout/index.vue'
import {renderIcon} from "../../utils";
import {Home} from '@vicons/ionicons5'

const routeName = 'dashboard'

const routes:Array<RouteRecordRaw> = [
    {
        path:'/dashboard',
        name:routeName ,
        component:Layout,
        redirect:'/dashboard/console',
        meta:{
            title:'首页',
            icon:renderIcon(Home),
            sort:0
        },
        children:[
            {
                path:'console',
                name:`${routeName}_console`,
                meta:{
                    title:'主控台',
                    icon:renderIcon(Home)
                },
                component:() => import('@/views/dashboard/index.vue')
            }
        ]
    }
];
export default routes